import { _decorator, AudioSource, Component, director, Game, Node } from 'cc';
import { GameState } from './GameState';
import { baseScene } from './baseScene';
const { ccclass, property } = _decorator;

@ccclass('homeScene')
export class homeScene extends baseScene {
    audioSource: AudioSource = null;
    start() {
        director.preloadScene('main');
        this.playSound();
    }
    onStartClick() {
        director.loadScene('main');
        this.stopSound();
    }
    onSoundClick() {
        GameState.soundOn = !GameState.soundOn;
        this.playSound();
    }
}


